<?php include $this->header();?>
<?php if(false) {?>
<link rel="stylesheet" rev="stylesheet" href="../../../images/admincp/style.css" type="text/css" media="all" />
<?php }?>
<div class="wrap">
<form method="post" enctype="multipart/form-data" target="_self" onsubmit="return Validator.Validate(this)">
<div class="bd p1 mt">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="rank">
    <tr class="th">
        <td colspan="2" align="left" valign="middle"> &nbsp;基本选项</td>
        </tr>
    <tr>
        <td width="140" align="right" valign="middle">品牌名称</td>
        <td><input name="brand_name" type="text" class="text-box" id="brand_name" onblur="Validator.check(this)" size="45" dataType="Require" msg="请填写菜单名称" value="<?=$brandItem['brand_name']?>" /> <b class="red">*</b></td>
    </tr>
    <tr>
        <td align="right" valign="middle">品牌分类</td>
        <td>
          <?php foreach($cats as $cat) { if($cat['depth'] == 1) {?>
          <input type="checkbox" name="cat_id[]" value="<?=$cat['cat_id']?>" <?php if(in_array($cat['cat_id'], $brandItem['cats'])) { ?> checked="checked" <?php } ?><?=$cat['cat_id']?> /><?=$cat['cat_name']?>
          <?php }} ?>
        </td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">品牌Logo</td>
        <td>
          <img src="<?php if($brandItem['brand_logo_id']) { ?>index.php?system/uploader/load/<?php print $brandItem['brand_logo_id']; } else { ?>images/admincp/ico-news.jpg<?php } ?>" style="padding:4px; background:#FFF; border:1px solid #E6E6E6; margin:0 0 8px 0 ;" />
          <br />          
          <input name="brand_logo" type="file" class="text-box" id="brand_logo"  style="height:22px;" size="36"/> </td>
    </tr>
    <!--
    <tr>
        <td width="140" align="right" valign="middle">品牌形象图片</td>
        <td><img src="images/admincp/ico-news.jpg" style="padding:4px; background:#FFF; border:1px solid #E6E6E6; margin:0 0 8px 0 ;" /><br /><input name="brand_image" type="file" class="text-box" id="brand_image"  style="height:22px;" size="36"/> </td>
    </tr>
    -->
    <tr>
        <td width="140" align="right" valign="middle">品牌企业名称</td>
        <td><input name="brand_company" type="text" class="text-box" id="brand_company" value="<?=$brandItem['brand_company']?>" size="45" /></td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">公司地址</td>
        <td><input name="brand_company_addr" type="text" class="text-box" id="brand_company_addr" value="<?=$brandItem['brand_company_addr']?>" size="45" /></td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">公司网址</td>
        <td><input name="brand_company_site" type="text" class="text-box" id="brand_company_site" value="<?=$brandItem['brand_company_site']?>" size="45" /></td>
    </tr>
    <tr>
        <td align="right" valign="middle">品牌介绍</td>
        <td><textarea id="brand_desc" class="brand_desc" name="brand_desc" rows="15" style="width:600px;" ><?=$brandItem['brand_desc']?>
        </textarea>
            </td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">是否启用</td>
        <td>
            <input name="brand_enabled" value="1" <?php if($brandItem['brand_enabled']) {?> checked="checked"  <?php } ?> type="radio" />
            是
            <input name="brand_enabled" value="0" type="radio" <?php if(!$brandItem['brand_enabled']) {?> checked="checked" <?php } ?> />
            否            
            <span class="note">（选择&quot;是&quot;，则该分类下得到商品在前台显示，选择&quot;否&quot;，则不显示）</span></td>
    </tr>
    <tr>
        <td align="right" valign="middle">品牌排序</td>
        <td><input name="brand_order" type="text" class="text-box" id="brand_order" value="<?=$brandItem['brand_order']?>" size="5" />
            <span class="note">（数字越小，排序越靠前）</span></td>
    </tr>
    <tr>
        <td align="right" valign="middle" class="nobd">&nbsp;</td>
        <td class="nobd"><input class="btn" type="submit" value="提交" />
            <input name="重置" type="reset" class="btn" value="重置" /></td>
    </tr>
</table>
</div>
</form>
</div>

<script type="text/javascript" src="js/editor.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
    //$("ul.tabs").tabs("div.panes > table");
	//$.ajaxf.init('js/AJAX.swf?'+Math.random());
});
ueEditor.apply('#brand_desc', {<?=SID_NAME?>:'<?=session_id()?>', 'user_id':'<?=$_SESSION['user_id']?>', 'ueid':'<?=$ueid?>'});
//]]>
</script>
<?php include $this->footer();?>